﻿<!DOCTYPE html>
<html>
<head>
    <title>CGI</title>
</head>
<body>
    <h1>Our Page</h1>
    <script>
        //01
        /*
        'use strict';
        try {
            throw 123;
        }
        catch (e) {
            console.log(e);
        }
       */

        //02
        //to use block scope,need to define var in catch block
        'use strict';
        try {
            throw 'myArtificialBlockLevelVar'
        }
        catch (blockLevelVar) {
            // blockLevlVaris in block scope
        };
        console.log(blockLevelVar);

    </script>
</body>
</html>